package io.gitee.thinkbungee.crud.mybatis.mapper.injected;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import io.gitee.thinkbungee.crud.mybatis.mapper.method.InsertBatch;

import java.util.List;

/**
 * 扩充baseMapper方法，自定义方法
 *
 * @author chenyichang
 * @date 2022/2/17
 */
public class SatelliteMybatisSqlInjector extends DefaultSqlInjector {
    /**
     * 增加自定义的方法实现
     */
    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass) {
        List<AbstractMethod> methodList = super.getMethodList(mapperClass);
        methodList.add(new InsertBatch());
        return methodList;
    }
}
